<% @posts.each do |post| %>
  <h2><%= link_to(h(post.title), post) %></h2>

  <p class="post-info">Filed under <%= link_and_join(post.tag_list, ', ') %></p>

  <div class="post-body">
    <%= truncate(simple_format(h(post.body)), :length => 255, :omission => "...") %>
    <p><%= link_to('Read more', post) %></p>
  </div>

  <p class="postmeta">
    <%= link_to(pluralize(post.approved_comments.size, 'Comment'), post_path(post, :anchor => 'comments')) %> |
    <span class="date"><%= post.created_at.to_s(:short_ordinal) %></span> |
    <%= link_to 'Add a comment', post_path(post, :anchor => 'add-comment') %>
  </p>
<% end %>
